package com.mc.music_web.services.impl;

import com.mc.music_web.entity.CD;
import com.mc.music_web.mapper.CdVoMapper;
import com.mc.music_web.services.CdVoService;
import com.mc.music_web.vo.CDVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CdVoServiceImpl  implements CdVoService {
    @Autowired
    private CdVoMapper cdVoMapper;
    public List<CDVo> selectCDVo() {
        return cdVoMapper.selectCDVo();
    }

    public CD selectByPrimaryKeyCDVo(Integer CDId) {
        CD cd=cdVoMapper.selectByPrimaryKeyCDVo(CDId);
        return cd;
    }

    public int delCDVo(Integer CDId) {
        return cdVoMapper.delCDVo(CDId);
    }

    public int insertCDVo(CD cd) {
        return cdVoMapper.insertCDVo(cd);
    }

    public int updateCDVo(CD cd) {
        return cdVoMapper.updateCDVo(cd);
    }

    public List<CDVo> selectByCD(String keyword) {
        return cdVoMapper.selectByCD(keyword);
    }
}
